#pragma once
#include "Action.h"
#include "..\lib\container\List.h"

namespace ds {

class Action;

class ActionManager {

struct Index {
	uint32 index;
	uint32 hash;
};

typedef List<Action*> Actions;

public:
	ActionManager();
	~ActionManager();
	void addAction(Action* action);
	void startAction(const char* name);
	void stopAction(const char* name);
	void update(float elapsed);
	bool isActive(const char* name);
	void debug();
private:
	Action* findAction(const char* name);
	Action* findActiveAction(const char* name);
	Actions m_Actions;
	Actions m_ActiveActions;
};

}

